package com.totoro.common;

import java.io.Serializable;

/**
 * Created by Niki on 2018/1/22 9:00
 */
public class Result<T> implements Serializable {
    private static final long serialVersionUID = 3335158624908123703L ;

    private boolean success ;
    private String msgCode ;
    private String msg ;
    private T data ; //返回给客户的数据

    public Result() {
    }

    /**
     * @param success
     * @param msgCode
     * @param msg
     */
    public Result(boolean success, String msg, String msgCode) {
        super() ;
        this.success = success ;
        this.msg = msg ;
        this.msgCode = msgCode ;
    }

    public Result(boolean success, String msg, String msgCode, T data) {
        this(success,msg,msgCode);
        this.data = data;
    }

    public boolean getSuccess() {
        return success ;
    }

    public void setSuccess(boolean success) {
        this.success = success ;
    }

    public String getMsgCode() {
        return msgCode ;
    }

    public void setMsgCode(String msgCode) {
        this.msgCode = msgCode ;
    }

    public String getMsg() {
        return msg ;
    }

    public void setMsg(String msg) {
        this.msg = msg ;
    }

    public T getData() {
        return data ;
    }

    public void setData(T data) {
        this.data = data ;
    }

}
